/**
 * Copyright (c) 2012 Tomi Paananen.
 *
 * Part of Quick Gestures user interface.
 */

import QtQuick 1.1
import com.nokia.meego 1.0

Item {
    id: folderModelListItem

    Rectangle {
        width: parent.width;
        height: Constants.DEFAULT_LIST_ITEM_HEIGHT
        color: delegateMouseArea.pressed ?
                   Constants.DEFAULT_BASE_COLOR :
                   Constants.DEFAULT_BACKGROUND_COLOR;

        Image {
            id: icon
            width: height;
            height: parent.height - 2 * Constants.DEFAULT_MARGIN
            anchors.verticalCenter: parent.verticalCenter
            source: folderModel.isFolder(index) ? "folder_icon.png"
                                                : "file_icon.png"
            smooth: true
        }

        Text {
            anchors {
                left: icon.right;
                leftMargin: Constants.DEFAULT_MARGIN
                verticalCenter: parent.verticalCenter
            }

            color: Constants.DEFAULT_TEXT_COLOR
            font.pixelSize: Constants.DEFAULT_FONT_PIXEL_SIZE
            text: fileName
        }
    }
}
